Skip to content

fix: Disable clear button instead of removing it#1203

Merged
mariush2 merged 3 commits into
mainfrom
fix/disabled-clear-button
Jan 12, 2026
Merged

fix: Disable clear button instead of removing it#1203
mariush2 merged 3 commits into
mainfrom
fix/disabled-clear-button

Conversation

@mariush2
Copy link
Copy Markdown
Contributor

@mariush2 mariush2 commented Jan 12, 2026

Azure DevOps links

User story


  • Needs to be tested locally by reviewer

Description

  • This PR fixes clear button being removed

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the clear button behavior in the Select component to be disabled instead of removed when the select itself is disabled, improving UX consistency.

Changes:

  • Modified SearchBar component to render clear button even when disabled, passing the disabled prop to the button
  • Added disabled state styling to ClearButton to show appropriate visual feedback
  • Updated test expectations to verify the clear button is disabled rather than not rendered

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/molecules/Select/SearchBar.tsx Removed disabled condition from clear button rendering logic and added disabled prop to ClearButton
src/molecules/Select/Select.styles.ts Added disabled state styling for clear button with appropriate fill color
src/molecules/Select/SingleSelect/SingleSelect.stories.tsx Updated test to verify clear button is disabled instead of checking it's not rendered
src/molecules/Select/Select.types.ts Formatting changes to interface declarations (no functional changes)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/molecules/Select/SearchBar.tsx Outdated
Comment thread src/molecules/Select/Select.styles.ts Outdated
Copilot AI review requested due to automatic review settings January 12, 2026 08:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/molecules/Select/SearchBar.tsx
@mariush2 mariush2 enabled auto-merge (squash) January 12, 2026 08:23
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 12, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 100% (🎯 100%) 16610 / 16610
🔵 Statements 100% (🎯 100%) 16610 / 16610
🔵 Functions 100% (🎯 100%) 1200 / 1200
🔵 Branches 100% (🎯 100%) 4136 / 4136
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/molecules/Select/SearchBar.tsx 100% 100% 100% 100%
src/molecules/Select/Select.styles.ts 100% 100% 100% 100%
Generated in workflow #2052 for commit d84fc03 by the Vitest Coverage Report Action

@mariush2 mariush2 merged commit cf1c2e9 into main Jan 12, 2026
17 checks passed
@mariush2 mariush2 deleted the fix/disabled-clear-button branch January 12, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants